//
//  ParentViewController.m
//  MM
//
//  Created by 王晨辉 on 15/5/14.
//  Copyright (c) 2015年 王晨辉. All rights reserved.1
//

#import "ParentViewController.h"
#import "ParentHistoryViewController.h"
#import "EMyTeacherViewController.h"
@interface ParentViewController ()

@end

@implementation ParentViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    //设置导航栏头文字
    self.navigationItem.title = @"家长观察报告";
    //设置导航栏背景颜色
    [self.navigationController.navigationBar setBarTintColor:[GetFileModel colorWithHexString:@"#44afd7" alpha:1]];
    //设置导航栏字体颜色
    [self.navigationController.navigationBar setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor],NSForegroundColorAttributeName,nil]];

    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    [button setBackgroundImage:[UIImage imageNamed:@"_0000_返回.png"]
                      forState:UIControlStateNormal];
    [button addTarget:self action:@selector(back)
     forControlEvents:UIControlEventTouchUpInside];
    button.frame = CGRectMake(0, 0, 20, 15);
    
    UIBarButtonItem *menuButton = [[UIBarButtonItem alloc] initWithCustomView:button];
    
    self.navigationItem.leftBarButtonItem = menuButton;
    
    self.view.backgroundColor = [UIColor whiteColor];

    [self subView];

    
 
    
    

    
    // Do any additional setup after loading the view from its nib.
}
-(void)subView{
    
    _oBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    _oBtn.frame = CGRectMake(29, NavbarHight+53/2, (SCREEN_WIDTH-29*2-30)/2, (SCREEN_WIDTH-29*2-30)/2);
    [_oBtn setBackgroundImage:[UIImage imageNamed:@"敏感期捕捉@2x.png.png"] forState:UIControlStateNormal];
    _oBtn.tag =2;
    [_oBtn addTarget:self action:@selector(got:) forControlEvents:UIControlEventTouchUpInside];
    UILabel * oLab = [[UILabel alloc]initWithFrame:CGRectMake(19, 90+(SCREEN_WIDTH-29*2-30)/2-10, (SCREEN_WIDTH-29*2-30)/2+20,125/2)];
    oLab.text = @"敏感期观察报告";
     oLab.adjustsFontSizeToFitWidth = YES;
    oLab.font = [UIFont systemFontOfSize:16];
    oLab.textAlignment = NSTextAlignmentCenter;
    
    
    _tBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    _tBtn.frame = CGRectMake(29+(SCREEN_WIDTH-29*2-30)/2+20, NavbarHight+53/2, (SCREEN_WIDTH-29*2-30)/2+20, (SCREEN_WIDTH-29*2-30)/2);
    [_tBtn setBackgroundImage:[UIImage imageNamed:@"感官统合测评@2x.png.png"] forState:UIControlStateNormal];
    _tBtn.tag =3;
    [_tBtn addTarget:self action:@selector(got1:) forControlEvents:UIControlEventTouchUpInside];
    UILabel * tLab = [[UILabel alloc]initWithFrame:CGRectMake(29+(SCREEN_WIDTH-29*2-30)/2+30, 90+(SCREEN_WIDTH-29*2-30)/2-10, (SCREEN_WIDTH-29*2-30)/2,125/2)];
    tLab.text = @"感觉统合观察报告";
     tLab.adjustsFontSizeToFitWidth = YES;
    tLab.font = [UIFont systemFontOfSize:16];
    tLab.textAlignment = NSTextAlignmentCenter;
    
    
    _sBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    _sBtn.frame = CGRectMake(29, NavbarHight+53/2+(SCREEN_WIDTH-29*2-30)/2+125/2, (SCREEN_WIDTH-29*2-30)/2, (SCREEN_WIDTH-29*2-30)/2);
    [_sBtn setBackgroundImage:[UIImage imageNamed:@"智能领域发现@2x.png.png"] forState:UIControlStateNormal];
    _sBtn.tag =4;
    [_sBtn addTarget:self action:@selector(got2:) forControlEvents:UIControlEventTouchUpInside];
    UILabel * sLab = [[UILabel alloc]initWithFrame:CGRectMake(19, NavbarHight+53/2+(SCREEN_WIDTH-29*2-30)/2+125/2+(SCREEN_WIDTH-29*2-30)/2-10, (SCREEN_WIDTH-29*2-30)/2+20,125/2)];
    sLab.text = @"智能特征观察报告";
     sLab.adjustsFontSizeToFitWidth = YES;
    sLab.font = [UIFont systemFontOfSize:16];
    sLab.textAlignment = NSTextAlignmentCenter;
    
    
    
    
    [self.view addSubview:sLab];
    [self.view addSubview:tLab];
    [self.view addSubview:oLab];
    [self.view addSubview:_oBtn];
    [self.view addSubview:_tBtn];
    [self.view addSubview:_sBtn];
    
    
    
}
#pragma mark-----btn点击事件
-(void)got:(UIButton *)send{
    
   
        ////NSLog(@"111111");
    
    EMyTeacherViewController * doorVC = [[EMyTeacherViewController alloc]init];
    doorVC.typeID = @"0";
    doorVC.name =@"敏感期捕捉报告";
    UINavigationController * nav = [[UINavigationController alloc]initWithRootViewController:doorVC];
    [self presentViewController:nav animated:YES completion:nil];
    
    


}
-(void)got1:(UIButton *)send{
    
    
    ////NSLog(@"2222222");
    
    EMyTeacherViewController * doorVC = [[EMyTeacherViewController alloc]init];
    doorVC.typeID = @"1";
    doorVC.name =@"感官统合评测报告";
    UINavigationController * nav = [[UINavigationController alloc]initWithRootViewController:doorVC];
    [self presentViewController:nav animated:YES completion:nil];
    
    
    
}
-(void)got2:(UIButton *)send{
    
    
    ////NSLog(@"3333333");
    
    EMyTeacherViewController * doorVC = [[EMyTeacherViewController alloc]init];
    doorVC.typeID = @"2";
    doorVC.name =@"智能领域发现报告";
    UINavigationController * nav = [[UINavigationController alloc]initWithRootViewController:doorVC];
    [self presentViewController:nav animated:YES completion:nil];
    
    
    
}
#pragma mark-----模态点出
-(void)back{
    
    [self dismissViewControllerAnimated:YES completion:^{
        
    }];
    
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
